3.6.8 \(\int \frac {\tanh ^{-1}(x)}{a+b x} \, dx\) [508]

Optimal. Leaf size=86 \[ -\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\text {PolyLog}\left (2,1-\frac {2}{1+x}\right )}{2 b}-\frac {\text {PolyLog}\left (2,1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b} \]

[Out]

-arctanh(x)*ln(2/(1+x))/b+arctanh(x)*ln(2*(b*x+a)/(a+b)/(1+x))/b+1/2*polylog(2,1-2/(1+x))/b-1/2*polylog(2,1-2*
(b*x+a)/(a+b)/(1+x))/b

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6057, 2449, 2352, 2497} \begin {gather*} -\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (x+1)}\right )}{2 b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(x+1) (a+b)}\right )}{b}+\frac {\text {Li}_2\left (1-\frac {2}{x+1}\right )}{2 b}-\frac {\log \left (\frac {2}{x+1}\right ) \tanh ^{-1}(x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcTanh[x]/(a + b*x),x]

[Out]

-((ArcTanh[x]*Log[2/(1 + x)])/b) + (ArcTanh[x]*Log[(2*(a + b*x))/((a + b)*(1 + x))])/b + PolyLog[2, 1 - 2/(1 +
 x)]/(2*b) - PolyLog[2, 1 - (2*(a + b*x))/((a + b)*(1 + x))]/(2*b)

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2449

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Dist[-e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2497

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/D[u, x])]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 6057

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTanh[c*x]))*(Log[2/
(1 + c*x)]/e), x] + (Dist[b*(c/e), Int[Log[2/(1 + c*x)]/(1 - c^2*x^2), x], x] - Dist[b*(c/e), Int[Log[2*c*((d
+ e*x)/((c*d + e)*(1 + c*x)))]/(1 - c^2*x^2), x], x] + Simp[(a + b*ArcTanh[c*x])*(Log[2*c*((d + e*x)/((c*d + e
)*(1 + c*x)))]/e), x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 - e^2, 0]

Rubi steps

\begin {align*} \int \frac {\tanh ^{-1}(x)}{a+b x} \, dx &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx}{b}-\frac {\int \frac {\log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{1-x^2} \, dx}{b}\\ &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}-\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+x}\right )}{b}\\ &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\text {Li}_2\left (1-\frac {2}{1+x}\right )}{2 b}-\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.06, size = 260, normalized size = 3.02 \begin {gather*} \frac {-\pi ^2+4 \tanh ^{-1}\left (\frac {a}{b}\right )^2+4 i \pi \tanh ^{-1}(x)+8 \tanh ^{-1}\left (\frac {a}{b}\right ) \tanh ^{-1}(x)+8 \tanh ^{-1}(x)^2-4 i \pi \log \left (1+e^{2 \tanh ^{-1}(x)}\right )-8 \tanh ^{-1}(x) \log \left (1+e^{2 \tanh ^{-1}(x)}\right )+8 \tanh ^{-1}\left (\frac {a}{b}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )+8 \tanh ^{-1}(x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )+4 i \pi \log \left (\frac {2}{\sqrt {1-x^2}}\right )+8 \tanh ^{-1}(x) \log \left (\frac {2}{\sqrt {1-x^2}}\right )+4 \tanh ^{-1}(x) \log \left (1-x^2\right )+8 \tanh ^{-1}(x) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-8 \tanh ^{-1}\left (\frac {a}{b}\right ) \log \left (2 i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-8 \tanh ^{-1}(x) \log \left (2 i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-4 \text {PolyLog}\left (2,-e^{2 \tanh ^{-1}(x)}\right )-4 \text {PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )}{8 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcTanh[x]/(a + b*x),x]

[Out]

(-Pi^2 + 4*ArcTanh[a/b]^2 + (4*I)*Pi*ArcTanh[x] + 8*ArcTanh[a/b]*ArcTanh[x] + 8*ArcTanh[x]^2 - (4*I)*Pi*Log[1
+ E^(2*ArcTanh[x])] - 8*ArcTanh[x]*Log[1 + E^(2*ArcTanh[x])] + 8*ArcTanh[a/b]*Log[1 - E^(-2*(ArcTanh[a/b] + Ar
cTanh[x]))] + 8*ArcTanh[x]*Log[1 - E^(-2*(ArcTanh[a/b] + ArcTanh[x]))] + (4*I)*Pi*Log[2/Sqrt[1 - x^2]] + 8*Arc
Tanh[x]*Log[2/Sqrt[1 - x^2]] + 4*ArcTanh[x]*Log[1 - x^2] + 8*ArcTanh[x]*Log[I*Sinh[ArcTanh[a/b] + ArcTanh[x]]]
 - 8*ArcTanh[a/b]*Log[(2*I)*Sinh[ArcTanh[a/b] + ArcTanh[x]]] - 8*ArcTanh[x]*Log[(2*I)*Sinh[ArcTanh[a/b] + ArcT
anh[x]]] - 4*PolyLog[2, -E^(2*ArcTanh[x])] - 4*PolyLog[2, E^(-2*(ArcTanh[a/b] + ArcTanh[x]))])/(8*b)

________________________________________________________________________________________

Maple [A]
time = 1.25, size = 106, normalized size = 1.23

method result size
default \(\frac {\ln \left (b x +a \right ) \arctanh \left (x \right )}{b}-\frac {-\frac {\left (\dilog \left (\frac {b x -b}{-a -b}\right )+\ln \left (b x +a \right ) \ln \left (\frac {b x -b}{-a -b}\right )\right ) b}{2}+\frac {\left (\dilog \left (\frac {b x +b}{b -a}\right )+\ln \left (b x +a \right ) \ln \left (\frac {b x +b}{b -a}\right )\right ) b}{2}}{b^{2}}\) \(106\)
risch \(-\frac {\dilog \left (\frac {\left (1-x \right ) b -a -b}{-a -b}\right )}{2 b}-\frac {\ln \left (1-x \right ) \ln \left (\frac {\left (1-x \right ) b -a -b}{-a -b}\right )}{2 b}+\frac {\dilog \left (\frac {\left (1+x \right ) b +a -b}{a -b}\right )}{2 b}+\frac {\ln \left (1+x \right ) \ln \left (\frac {\left (1+x \right ) b +a -b}{a -b}\right )}{2 b}\) \(120\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctanh(x)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

ln(b*x+a)/b*arctanh(x)-1/b^2*(-1/2*(dilog((b*x-b)/(-a-b))+ln(b*x+a)*ln((b*x-b)/(-a-b)))*b+1/2*(dilog((b*x+b)/(
b-a))+ln(b*x+a)*ln((b*x+b)/(b-a)))*b)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 119, normalized size = 1.38 \begin {gather*} -\frac {{\left (\log \left (x + 1\right ) - \log \left (x - 1\right )\right )} \log \left (b x + a\right )}{2 \, b} + \frac {\operatorname {artanh}\left (x\right ) \log \left (b x + a\right )}{b} - \frac {\log \left (x - 1\right ) \log \left (\frac {b x - b}{a + b} + 1\right ) + {\rm Li}_2\left (-\frac {b x - b}{a + b}\right )}{2 \, b} + \frac {\log \left (x + 1\right ) \log \left (\frac {b x + b}{a - b} + 1\right ) + {\rm Li}_2\left (-\frac {b x + b}{a - b}\right )}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(x)/(b*x+a),x, algorithm="maxima")

[Out]

-1/2*(log(x + 1) - log(x - 1))*log(b*x + a)/b + arctanh(x)*log(b*x + a)/b - 1/2*(log(x - 1)*log((b*x - b)/(a +
 b) + 1) + dilog(-(b*x - b)/(a + b)))/b + 1/2*(log(x + 1)*log((b*x + b)/(a - b) + 1) + dilog(-(b*x + b)/(a - b
)))/b

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(x)/(b*x+a),x, algorithm="fricas")

[Out]

integral(arctanh(x)/(b*x + a), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}{\left (x \right )}}{a + b x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atanh(x)/(b*x+a),x)

[Out]

Integral(atanh(x)/(a + b*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(x)/(b*x+a),x, algorithm="giac")

[Out]

integrate(arctanh(x)/(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {atanh}\left (x\right )}{a+b\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atanh(x)/(a + b*x),x)

[Out]

int(atanh(x)/(a + b*x), x)

________________________________________________________________________________________